Skip to main content

Add User to Team

This endpoint provisions a user to an existing team by making an HTTP POST request with team and user details. It uses query parameters for authentication and a JSON request body containing user provisioning details.


API Endpoint

api/v3/provisioning/user-team/team/{teamId}?apikey=<API_KEY>&email=<EMAIL>

Request Syntax

POST /api/v3/provisioning/user-team/team/{teamId}?apikey=<API_KEY>&email=<EMAIL>

Request Body

{
"userId": "234567890",
"supervisorId": "ef234174-db01-4e4d-95c5-495b3234e1fefd",
"description": "sales team"
}

  • Content-Type:
    • application/x-www-form-urlencoded (form-data)
  • Parameters:
    • email: Caller’s EMAIL
    • apikey: API KEY
  • Path Parameter:
    • teamId: The ID of the team to provision into

Properties

PlaceholderTypeRequiredDescription
userIdstringYesThe ID of the user being provisioned
supervisorIdstringYesThe supervisor for the user/team
descriptionstringNoA brief description of the team/user context

Example

Sample Request

curl --location --globoff 'https://alb-backend.msgkart.com/api/v3/provisioning/user-team/team/{{teamId}}?apikey=<API KEY>&email=<EMAIL ID>' \
--header 'Content-Type: application/json' \
--data '{
"userId": "234567890",
"supervisorId": "ef4sd174-db01-4e4d-95c5-495b1sds3efd",
"description": "sales team"
}'

Response

  • HTTP Status Code: 200 OK (successful), 4xx/5xx (error)
  • Response Body: JSON object containing user status details.

Error Handling

  • Invalid credentials: 401 Unauthorized
  • Missing/invalid parameters: 400 Bad Request
  • Internal server error: 500 Internal Server Error